﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.Xpo.Helpers;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    [Persistent("TopProduct")]
    public class TopProduct : BaseObject
    {
        //begin
        public TopProduct()
        {}
        public TopProduct(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private string _ProductId;
        public string ProductId
        {
            get
            {
                return _ProductId;
            }
            set
            {
                SetPropertyValue("ProductId", ref _ProductId, value);
            }
        }
        private string _OuterId;
        public string OuterId
        {
            get
            {
                return _OuterId;
            }
            set
            {
                SetPropertyValue("OuterId", ref _OuterId, value);
            }
        }
        private DateTime _Created;
        public DateTime Created
        {
            get
            {
                return _Created;
            }
            set
            {
                SetPropertyValue("Created", ref _Created, value);
            }
        }
        private string _Tsc;
        public string Tsc
        {
            get
            {
                return _Tsc;
            }
            set
            {
                SetPropertyValue("Tsc", ref _Tsc, value);
            }
        }
        private string _Cid;
        public string Cid
        {
            get
            {
                return _Cid;
            }
            set
            {
                SetPropertyValue("Cid", ref _Cid, value);
            }
        }
        private string _CatName;
        public string CatName
        {
            get
            {
                return _CatName;
            }
            set
            {
                SetPropertyValue("CatName", ref _CatName, value);
            }
        }
        private string _Props;
        public string Props
        {
            get
            {
                return _Props;
            }
            set
            {
                SetPropertyValue("Props", ref _Props, value);
            }
        }
        private string _PropsStr;
        public string PropsStr
        {
            get
            {
                return _PropsStr;
            }
            set
            {
                SetPropertyValue("PropsStr", ref _PropsStr, value);
            }
        }
        private string _BindsStr;
        public string BindsStr
        {
            get
            {
                return _BindsStr;
            }
            set
            {
                SetPropertyValue("BindsStr", ref _BindsStr, value);
            }
        }
        private string _SalePropsStr;
        public string SalePropsStr
        {
            get
            {
                return _SalePropsStr;
            }
            set
            {
                SetPropertyValue("SalePropsStr", ref _SalePropsStr, value);
            }
        }
        private long _CollectNum;
        public long CollectNum
        {
            get
            {
                return _CollectNum;
            }
            set
            {
                SetPropertyValue("CollectNum", ref _CollectNum, value);
            }
        }
        private string _Name;
        public string Name
        {
            get
            {
                return _Name;
            }
            set
            {
                SetPropertyValue("Name", ref _Name, value);
            }
        }
        private string _Binds;
        public string Binds
        {
            get
            {
                return _Binds;
            }
            set
            {
                SetPropertyValue("Binds", ref _Binds, value);
            }
        }
        private string _SaleProps;
        public string SaleProps
        {
            get
            {
                return _SaleProps;
            }
            set
            {
                SetPropertyValue("SaleProps", ref _SaleProps, value);
            }
        }
        private decimal _Price;
        public decimal Price
        {
            get
            {
                return _Price;
            }
            set
            {
                SetPropertyValue("Price", ref _Price, value);
            }
        }
        private string _Desc;
        [Size(SizeAttribute.Unlimited)]
        public string Desc
        {
            get
            {
                return _Desc;
            }
            set
            {
                SetPropertyValue("Desc", ref _Desc, value);
            }
        }
        private string _PicUrl;
        public string PicUrl
        {
            get
            {
                return _PicUrl;
            }
            set
            {
                SetPropertyValue("PicUrl", ref _PicUrl, value);
            }
        }
        private DateTime _Modified;
        public DateTime Modified
        {
            get
            {
                return _Modified;
            }
            set
            {
                SetPropertyValue("Modified", ref _Modified, value);
            }
        }
        [Association("TopProductProductImgs", typeof(TopProductImg)), Aggregated]
        public XPCollection<TopProductImg> ProductImgs
        {
            get
            {
                return GetCollection<TopProductImg>("ProductImgs");
            }
        }
        [Association("TopProductProductPropImgs", typeof(TopProductPropImg)), Aggregated]
        public XPCollection<TopProductPropImg> ProductPropImgs
        {
            get
            {
                return GetCollection<TopProductPropImg>("ProductPropImgs");
            }
        }
        private long _Status;
        public long Status
        {
            get
            {
                return _Status;
            }
            set
            {
                SetPropertyValue("Status", ref _Status, value);
            }
        }
        private long _Level;
        public long Level
        {
            get
            {
                return _Level;
            }
            set
            {
                SetPropertyValue("Level", ref _Level, value);
            }
        }
        private string _PicPath;
        public string PicPath
        {
            get
            {
                return _PicPath;
            }
            set
            {
                SetPropertyValue("PicPath", ref _PicPath, value);
            }
        }
        private long _VerticalMarket;
        public long VerticalMarket
        {
            get
            {
                return _VerticalMarket;
            }
            set
            {
                SetPropertyValue("VerticalMarket", ref _VerticalMarket, value);
            }
        }
        private string _CustomerProps;
        public string CustomerProps
        {
            get
            {
                return _CustomerProps;
            }
            set
            {
                SetPropertyValue("CustomerProps", ref _CustomerProps, value);
            }
        }
        private string _PropertyAlias;
        public string PropertyAlias
        {
            get
            {
                return _PropertyAlias;
            }
            set
            {
                SetPropertyValue("PropertyAlias", ref _PropertyAlias, value);
            }
        }
        //end
    }
}
